package com.lwf.thymeleafdemo1.mysqlTest.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.lwf.thymeleafdemo1.global.WrapperResponse;
import com.lwf.thymeleafdemo1.mysqlTest.dao.PsnInfoBDAO;
import com.lwf.thymeleafdemo1.mysqlTest.entity.PsnInfoBDTO;
import com.lwf.thymeleafdemo1.mysqlTest.service.PsnInfoBService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author makejava
 * @Desc (PsnInfoBDTO)表服务实现类
 * @Date 2023-07-22 16:07:59
 */
@RequiredArgsConstructor
@Service("psnInfoBService")
public class PsnInfoBServiceImpl extends ServiceImpl<PsnInfoBDAO, PsnInfoBDTO> implements PsnInfoBService {
    @Autowired
    private PsnInfoBDAO psnInfoBDAO;


    @Override
    public WrapperResponse<IPage> queryByPage(PsnInfoBDTO param) {
        return WrapperResponse.ok(psnInfoBDAO.queryByPage(param, param));
    }


    @Override
    public WrapperResponse queryById(String psnNo) {
        return WrapperResponse.ok(psnInfoBDAO.queryById(psnNo));
    }


    @Override
    public WrapperResponse insert(PsnInfoBDTO PsnInfoBDTO) {
        int num = psnInfoBDAO.insert(PsnInfoBDTO);
        return WrapperResponse.ok(num);
    }


    @Override
    public WrapperResponse update(PsnInfoBDTO PsnInfoBDTO) {
        int num = psnInfoBDAO.update(PsnInfoBDTO);
        return WrapperResponse.ok(num);
    }


    @Override
    public WrapperResponse deleteById(String psnNo) {
        int num = psnInfoBDAO.deleteById(psnNo);
        return WrapperResponse.ok(num);
    }

}
